<%@page import="Bean.mboardsBean"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String myContext = request.getContextPath();
	mboardsBean mbBean = (mboardsBean) request.getAttribute("board");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style>
.twoCol {
	margin: 0px 0px 0px 0px;
}

.ResultTab {
	font-size: small;
	font-family: 맑은 고딕;
	margin: 0px 0px 0px 0px;
}
</style>
</head>
<body class="twoCol">
	<jsp:include page="../main/upMenu.jsp" />
	<div id="wrapper">
		<div id="subhead">
			<a href="<%=myContext%>/startHome.main">
			<img src="<%=myContext%>/jsp/image/subLogo.gif" /></a>
		</div>
		<div id="submenu"></div>
		<form method="post" action="<%=myContext%>/list.mb" class="ResultTab">
			<input type="hidden" name="mbnum" value="<%=request.getParameter("mbnum")%>">
			<input type="hidden" name="pageNumber" value="<%=request.getParameter("pageNumber")%>">
			<table width="600" border="0" cellspacing="0" cellpadding="0" align="center">

				<tr bgcolor="#777777">
					<td height="1" colspan="2"></td>
				</tr>
				<tr>
					<td width="100" bgcolor="#F4F4F4"><font color="#FF0000"></font> 제목</td>
					<td width="500" bgcolor="#FFFFFF">${mb.mbtitle}</td>
				</tr>
				<tr bgcolor="#777777">
					<td height="1" colspan="2"></td>
				</tr>
				<tr>
					<td bgcolor="#F4F4F4"><font color="#FF0000"></font> 카테고리</td>
					<td bgcolor="#FFFFFF">${mb.mbcategory}</td>
				</tr>
				<tr bgcolor="#777777">
					<td height="1" colspan="2"></td>
				</tr>

				<tr>
					<td bgcolor="#F4F4F4"><font color="#FF0000"></font> 내용</td>
					<td bgcolor="#FFFFFF"><textarea dir="ltr" cols="70" rows="10">${mb.mbcontent}</textarea>
					</td>
				</tr>

				<tr bgcolor="#777777">
					<td height="1" colspan="2"></td>
				</tr>
				<tr>
					<td height="10" colspan="2"></td>
				</tr>
				<tr>
					<td align="right" colspan="2">
			<c:set var="delmid" value="${mb.mid}"></c:set>
			<c:choose>
				<c:when test="${sessionScope.member.mid == null }">
					<input type="submit" value="돌아가기" class="button2">
				</c:when>
				<c:when test="${sessionScope.member.mid == delmid }">
					<a href="<%=myContext%>/delete.mb?mbnum=${mb.mbnum}"><input type="button" class="button2" value="삭제"></a>
					<a href="<%=myContext%>/find.mb?mbnum=${mb.mbnum}"><input type="button" class="button2" value="수정"></a>
					<input type="submit" value="돌아가기" class="button2">	
				</c:when>
				<c:otherwise>
					<input type="submit" value="돌아가기" class="button2">
				</c:otherwise>
			</c:choose>
					</td>
				</tr>
			</table>
		</form>
		<div id="siteDown">
			<img src="<%=myContext%>/jsp/image/footer.gif">
		</div>
	</div>

</body>
</html>